package br.com.wai2008.client.presentation;

import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Dimension;

import br.com.wai2008.client.dataobject.WAILocalizationObject;
import br.com.wai2008.client.service.ServiceWAI;
import br.com.wai2008.client.wireless.WAISignalsInterface;

/**
 * This class builds the client's interface based on SWING GUI.
 * It cares about the presentation's layer.
 * 
 * @since 
 * 		September, 2008.
 * 
 * @version
 * 		WAI2008 - version 1.0
 * 
 * @author 
 * 		Andre Romero Goncales
 */
public class WAI2008Interface extends Applet {

	private static final long serialVersionUID = -4623757386027571791L;

	public final static int APP_W = 240;
	public final static int APP_H = 320;
	
	private ServiceWAI service = null;
	
	public WAI2008Interface() {
		this.service = new ServiceWAI();
	}
	
	public void init() {
		resize(868, 600);
	    this.buildServicePanel();
	    setVisible(true);
	}
	
	private void buildServicePanel() {
		
		WAI2008ServiceMap map = new WAI2008ServiceMap(this);
		setLayout(new BorderLayout());
		add(BorderLayout.CENTER, map);
		add(BorderLayout.NORTH, new WAI2008ServiceBar(this, map));
	}
	
	public ServiceWAI getService() {
		return this.service;
	}

	public String getAppletInfo() {
		return "Visualizador de mapas";
	}
	
	public WAILocalizationObject getLocalizacaoFinal() {
		return null;
	}

	public int getTipoRetricao() {
		return 0;
	}
	
	public static void main (String[] args) {
		new WAI2008Interface().init();
	}
}
